<?php
/* @var $this RatingtypeController */
/* @var $model Ratingtype */
/* @var $form TbActiveForm */
?>

<div class="form">

	<?php
	$form = $this->beginWidget('bootstrap.widgets.TbActiveForm', array(
		'id' => 'ratingtype-form',
		// Please note: When you enable ajax validation, make sure the corresponding
		// controller action is handling ajax validation correctly.
		// There is a call to performAjaxValidation() commented in generated controller code.
		// See class documentation of CActiveForm for details on this.
		'enableAjaxValidation' => true,
		'clientOptions' => array(
			'validateOnSubmit' => true,
		),
	));
	?>


	<?php echo $form->errorSummary($model); ?>

	<?php echo $form->dropDownListControlGroup($model, 'ratingItem', Controller::$ratingItems, array('style' => 'width:40%')); ?>	

	<?php echo $form->textFieldControlGroup($model, 'ratingTitle', array('span' => 5, 'maxlength' => 255)); ?>

		<?php echo $form->textFieldControlGroup($model, 'ratingMax', array('span' => 5)); ?>

	<div class="form-actions">
		<?php
		echo TbHtml::submitButton($model->isNewRecord ? 'Create' : 'Save', array(
			'color' => TbHtml::BUTTON_COLOR_PRIMARY,
			'size' => TbHtml::BUTTON_SIZE_LARGE,
		));
		?>
    </div>

<?php $this->endWidget(); ?>

</div><!-- form -->